<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>How do I install and run the Feed Validator?</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">@import "../../css/common.css";
@import "../../css/documentation.css";</style>
<script type="text/javascript"><!-- --></script>
<link rel="start" href="http://feedvalidator.org/docs/" title="Home" />
</head>
<body>
<div id="logo">
<h1><a href="/"><span id="feed"><span id="f">F</span><span id="e1">E</span><span id="e2">E</span></span><span id="d">D</span> Validator</a></h1>
<p>Documentation</p>
<a class="skip" href="#startnavigation">Jump to navigation</a>
</div> <!--logo-->

<div id="main">

<p>Here&#8217;s a simple starter for hacking on the Feed Validator,
either to make fixes, or simply to use it for non-public feeds.</p>

<p>(This is for Linux &#8211; tips for Windows or other environments
are welcome!)</p>

<h3>Get the code</h3>

<div class="docbody">
<p>The Feed Validator doesn&#8217;t make official releases,
but it&#8217;s regularly updated and a current snapshot is almost always stable.
Choose a local directory to store the validator in &#8211; say,
<code>~/feedvalidator</code>.</p>

<h4>Download a snapshot</h4>
<p>Nightly snapshots are available from
<a href="http://feedvalidator.org/download/" title="Index of /download">http://feedvalidator.org/download/</a>.</p>

<h4>Or, use Subversion</h4>
<p>Subversion is slightly more complicated to get working, but then you can
keep current.</p>

<blockquote>
<pre>svn checkout http://feedvalidator.googlecode.com/svn/trunk/feedvalidator</pre>
</blockquote>

<p>Later, to get the latest code, call <code>svn up</code> from inside the
feedvalidator directory.</p>
</div>

<h3>Run it from the command line</h3>

<div class="docbody">
<p>There's a command-line interface:</p>

<blockquote>
<pre>python src/demo.py <i>&lt;feed url&gt;</i></pre>
</blockquote>

<p>(Or, hack that script to work how you want.)</p>
</div>

<h3>Set it up for your web server</h3>

<div class="docbody">
<p>First install a web server, Python and additional
character encoding support. Under Debian:</p>

<blockquote>
<pre>apt-get install apache2-mpm-worker python2.3 python2.3-iconvcodec</pre>
</blockquote>

<h4>Standard Method</h4>

<p>For simplicity, it&#8217;s easiest to run the validator out of a regular
user account. That means you don't need to be root.</p>

<p>To do this, simply unpack or check out the Feed Validator into your
<code>public_html</code> directory.  Now open a browser to
<code>http://localhost/~<i>&lt;your usercode&gt;</i>/feedvalidator/check.cgi</code>
and we&#8217;re, hopefully, done.</p>

<h4>Do you have special requirements?</h4>

<p>If you have special requirements for things like where directories are
to be placed, you may want to tweak the <a href="../../config.py">config.py</a>
file.  For example, if you want to separate the code, the cgi, the docs, and
css files, you copy/link to only the files you need:</p>

<blockquote>
<pre>FVDIR=<i>&lt;location of the feedvalidator directory&gt;</i>
cd ~/public_html
ln -s "$FVDIR/css" fv-css
ln -s "$FVDIR/docs" fv-docs
mkdir -p cgi-bin/fv
cp "$FVDIR/check.cgi" "$FVDIR/config.py" cgi-bin/fv/</pre>
</blockquote>

<p>Now, tweak <code>config.py</code> to point to the other directories:</p>

<blockquote>
<pre><del>WEBDIR = '/'.join(os.environ['SCRIPT_FILENAME'].split('/')[0:-1])</del>
<ins>WEBDIR = '/home/<i>&lt;your usercode&gt;</i>/feedvalidator'</ins>

<del>DOCSURL='docs'</del>
<del>CSSURL='css'</del>
<ins>DOCSURL='../../fv-docs'</ins>
<ins>CSSURL='../../fv-css'</ins></pre>
</blockquote>

<p>Great!</p>

<p>Now open a browser to <code>http://localhost/~<i>&lt;your usercode&gt;</i>/cgi-bin/fv/check.cgi</code>.</p>


</div>

<h3>Running tests</h3>

<div class="docbody">
<p>I don&#8217;t think it&#8217;s any disrespect to say that that the
<a href="../../testcases/">test cases</a>
are the Validator&#8217;s
most valuable asset &#8211; currently over fourteen hundred separate cases
of valid, and invalid, feeds, along with the precise errors. When you find a
bug, or any other misfeature, a simple test case is the best way to get
your point across.</p>

<p>To check the existing cases, run <code>python src/validtest.py</code>.
This will check everything below the &#8216;testcases&#8217; directory (you
can also specify a single test by filename).</p>

</div>

<h2>Not clear? Suggestions or improvements?</h2>
<div class="docbody">
<p>Let us know on the <a href="http://groups.google.com/group/feedvalidator-users">feedvalidator-users</a> discussion list!</p>
</div>

<p class="meta">This documentation page was last updated on Februaru 26, 2006.</p>
</div><!--main-->
<div class="centered">
<a name="startnavigation" id="startnavigation"></a>
<div class="navbarWrapper">
    <div class="navbarContent">
        <img class="borderTL" src="../../images/borderTL.gif" alt="" width="14" height="14" />
        <img class="borderTR" src="../../images/borderTR.gif" alt="" width="14" height="14" />

<p>
<a href="../../">Home</a> &middot;
<a href="../../about.html">About</a> &middot;
<a href="../../news/">News</a> &middot;
<a href="../../docs/">Docs</a> &middot;
<a href="../../terms.html">Terms</a>
</p>

        <div class="roundedCornerSpacer">&nbsp;</div>
    </div><!-- .content -->
    <div class="bottomCorners">
        <img class="borderBL" src="../../images/borderBL.gif" alt="" width="14" height="14" />
        <img class="borderBR" src="../../images/borderBR.gif" alt="" width="14" height="14" />
    </div><!-- .bottomCorners -->
</div><!-- .contentWrapper -->
</div><!-- .centered -->

<div class="centered">
<address>Copyright © 2002-6
<a href="http://www.intertwingly.net/blog/">Sam Ruby</a>, 
<a href="http://diveintomark.org/">Mark Pilgrim</a>,
<a href="http://www.kafsemo.org/">Joseph Walton</a>, and
<a href="http://philringnalda.com/">Phil Ringnalda</a>
</address>
</div>

</body>
</html>
